package com.wontube.smr.web.client.model.vo;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import com.wontube.client.modle.vo.PagenateInfo;
import com.wontube.client.modle.vo.PagenateSupport;
import com.wontube.smr.web.client.model.po.Feedback;


/**
 * @author tanggf(2012-5-5)
 *
 */
public class FeedbackItems implements Serializable {	
	private static final long serialVersionUID = -3122702588532504736L;
	
	private PagenateSupport pagenate = new PagenateSupport();
	private List<Feedback> items = new ArrayList<Feedback>();
	public FeedbackItems() {		
	}
	
	public FeedbackItems(PagenateInfo pageInfo) {		
		if(pageInfo != null){
			if(pageInfo.getPageSize() > PagenateSupport.maxPageSize){
				pageInfo.setPageSize(PagenateSupport.maxPageSize);
			}
			pagenate.setPagenateInfo(pageInfo);
		}
	}	
	
	public int getPageNo(){
		return pagenate.getPageNo();
	}
	
	public int getPageCount(){
		return pagenate.getPageCount();
	}
	
	public void setTotalCount(int total){
		pagenate.setTotalCount(total);
	}
	
	public PagenateSupport getPagenate() {
		return pagenate;
	}
	public void setPagenate(PagenateSupport pagenate) {
		this.pagenate = pagenate;
	}
	public List<Feedback> getItems() {
		return items;
	}
	public void setItems(List<Feedback> items) {
		this.items = items;
	}	
}